/*
 * @Author: Aro
 * @Date: 2024-01-25 13:38:52
 */
// 通用的高斯模糊处理

import 'dart:ui';

import 'package:flutter/material.dart';

class GaussianBlurKit extends StatelessWidget {
  const GaussianBlurKit({
    super.key,
    required this.child,
    this.sigmaX = 12,
    this.sigmaY = 12,
    this.color = Colors.white70,
  });

  final Widget child;
  final double sigmaX;
  final double sigmaY;
  final Color color;

  @override
  Widget build(BuildContext context) {
    return ClipRect(
      child: BackdropFilter(
        filter: ImageFilter.blur(sigmaX: sigmaX, sigmaY: sigmaY),
        child: Container(
          decoration: BoxDecoration(color: color),
          child: child,
        ),
      ),
    );
  }
}
